﻿// Page2.cpp: 实现文件
//

#include "pch.h"
#include "DCM.h"
#include "Page2.h"
#include "afxdialogex.h"
#include "CDCMEngine.h"


// Page2 对话框
extern CDCMEngine* g_pEngine;

Page2* g_pPage2 = NULL;
IMPLEMENT_DYNAMIC(Page2, CDialogEx)

Page2::Page2(CWnd* pParent /*=nullptr*/)
	: CDialogEx(IDD_Page2, pParent)
{



}

Page2::~Page2()
{
}

void Page2::DoDataExchange(CDataExchange* pDX)
{
	CDialogEx::DoDataExchange(pDX);


	DDX_Control(pDX, IDC_STATIC_WndId, m_static_wndId);
	DDX_Control(pDX, IDC_EDIT_WalletAddress, m_edit_walletAddress);
}


BEGIN_MESSAGE_MAP(Page2, CDialogEx)


END_MESSAGE_MAP()


// Page2 消息处理程序s
BOOL Page2::OnInitDialog()
{
	CDialogEx::OnInitDialog();
	//初始化加载配置

	g_pPage2 = this;



	
	return TRUE;
}




void Page2::setInfo(int id) {

	if ( id>-1 && id < g_pEngine->m_wndiniList.GetCount()) {

		tagGameIni* gameIni = g_pEngine->m_wndiniList[id];

		m_edit_walletAddress.SetWindowText(gameIni->钱包地址);

	}
	CString strWnd;
	strWnd.Format(_T("当前%d号窗口"), id+1);
	m_static_wndId.SetWindowTextW(strWnd);
}



